import 'package:flutter/material.dart';

// 容器组件有一个child，用于装饰和限制child，如对边框、背景色、尺寸的设计
void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: Text('内边距容器'),
        ),
        body: Container(
          color: Colors.redAccent,
          child: Padding(
            padding: EdgeInsets.all(12),
            child: Text('Padding'),
          ),
        ),
      ),
    );
  }
}
